From: Wei Liu Date: Tue, 10 Jul 2018 13:35:11 +0000 (+0100) Subject: libxl/vsnd: add missing error checks X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3635 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d7b1c5f7fa0e85fad4c61b927ff39896323e3374;p=xen.git libxl/vsnd: add missing error checks Reported-by: Coverity Signed-off-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl_vsnd.c b/tools/libxl/libxl_vsnd.c index cf46e3ddb1..9570a4cf0e 100644 --- a/tools/libxl/libxl_vsnd.c +++ b/tools/libxl/libxl_vsnd.c @@ -192,6 +192,7 @@ static int libxl__pcm_from_xenstore(libxl__gc *gc, const char *path, GCSPRINTF("%s/"XENSND_FIELD_DEVICE_NAME, path), NULL); rc = libxl__params_from_xenstore(gc, path, &pcm->params); + if (rc) goto out; pcm->streams = NULL; pcm->num_vsnd_streams = 0; @@ -253,6 +254,7 @@ static int libxl__vsnd_from_xenstore(libxl__gc *gc, const char *libxl_path, fe_path), NULL); rc = libxl__params_from_xenstore(gc, fe_path, &vsnd->params); + if (rc) goto out; vsnd->pcms = NULL; vsnd->num_vsnd_pcms = 0;